from django.db import models

# Create your models here.
class User(models.Model):
    SEX_CHOICES = (
        (0, '男'),
        (1, '女')
    )
    uname = models.CharField('姓名', max_length=15)
    uaccount = models.CharField('账号', max_length=32)
    upwd = models.CharField('密码', max_length=99)
    uage = models.IntegerField('年龄', default=33, null=True)
    usex = models.SmallIntegerField('性别', choices=SEX_CHOICES, null=True, default=1 )
    class Meta:
        db_table = 'tb_user'
    def __str__(self):
        return self.uname



